<%@ page contentType="text/html;charset=UTF-8" language="java" isErrorPage="true"%>
<%@ page import="org.slf4j.Logger,org.slf4j.LoggerFactory" %>
<%
	response.setStatus(HttpServletResponse.SC_OK); //这句也一定要写,不然IE不会跳转到该页面
	String path=request.getContextPath();
	%>
<html>
<head>
    <title>异常处理页面</title>
</head>
<body>
<H3>错误：</H3><%=exception%>
<H4>错误码： <%=request.getAttribute("javax.servlet.error.status_code")%> <br>
	 信息： <%=path+request.getAttribute("javax.servlet.error.message")%> <br></H4>
<H4>
 <%
 	Logger logger = LoggerFactory.getLogger("Error.jsp");
 	if(null != exception){
 		exception.printStackTrace(response.getWriter());
 	}else{
 		String errorCode = request.getAttribute("javax.servlet.error.status_code").toString();
 		String message = request.getAttribute("javax.servlet.error.message").toString();
 		logger.info("ErrorCode:{},Message:{}", errorCode,message);
 	}
 %>
</H4>
</body>
</html>